<?= $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Menashop</title>
        <link type="text/css" rel="stylesheet" href="/css/admin/global.css"/>
        <?= $this->headLink() ?>
        <script type="text/javascript" src="/js/jquery.js"></script>
        <?= $this->headScript() ?>
    </head>
    <body>
        <div class="all">
            <div class="header">
                <div class="logo">
                    <a href="/<?= $this->language ?>"><span><?= $this->shopName ?></span><br/><?= $this->translate('Online store in Mena'); ?></a>
                </div> 
                <? if (!$this->formLogin): ?>
                    <div class="user">
                        <a href="/<?= $this->language ?>/admin/logout"><?= $this->translate('Logout'); ?></a>
                    </div>
                <? endif; ?>
                <div class="languages">
                    <?= $this->translate('Language'); ?>			
                    <a href="/<?= $this->language . $this->currentUrl ?>">
                        <img src="/images/<?= $this->language ?>_flag.png"/>
                        <span><?= $this->translate($this->language); ?></span>					
                    </a>
                    <?= $this->translate('others'); ?>
                    <? foreach ($this->languages as $language): ?>
                        <? if ($language != $this->language): ?>
                            <a href="<?= '/' . $language . $this->currentUrl ?>">
                                <img src="/images/<?= $language ?>_flag.png"/>
                                <span><?= $this->translate($language); ?></span>
                            </a>
                        <? endif ?>
                    <? endforeach ?>
                </div>
                <? if ($this->isLogined): ?>
                    <div class="menu-bar">
                        <div class="menu">
                            <ul>
                                <span class="delimiter"></span>
                                <li>
                                    <span><?= $this->translate('Sales'); ?></span>
                                    <ul>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/order/index"><?= $this->translate('Orders'); ?></a>
                                        </li>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/invoice/index"><?= $this->translate('Invoices'); ?></a>
                                        </li>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/shipment/index"><?= $this->translate('Shipments'); ?></a>
                                        </li>
                                    </ul>
                                </li>
                                <span class="delimiter"></span>
                                <li>
                                    <span><?= $this->translate('Catalog'); ?></span>
                                    <ul>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/category/index"><?= $this->translate('Categories'); ?></a>
                                        </li>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/feature/index"><?= $this->translate('Features'); ?></a>
                                        </li>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/feature_group/index"><?= $this->translate('Feature groups'); ?></a>
                                        </li>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/product/index"><?= $this->translate('Products'); ?></a>
                                        </li>
                                    </ul>
                                </li>
                                <span class="delimiter"></span>
                                <li>
                                    <span><?= $this->translate('Marketing'); ?></span>
                                    <ul>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/price_rule/index"><?= $this->translate('Price rules'); ?></a>
                                        </li>
                                    </ul>
                                </li>
                                <span class="delimiter"></span>
                                <li>
                                    <span><?= $this->translate('Supply'); ?></span>
                                    <ul>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/distributor/index"><?= $this->translate('Distributors'); ?></a>
                                        </li>
                                        <li>
                                            <a href="/<?= $this->language ?>/admin/distributor_price/index"><?= $this->translate('Distributor prices'); ?></a>
                                        </li>
                                    </ul>
                                </li>
                                <span class="delimiter"></span>
                            </ul>
                        </div> 
                    </div>
                <? endif; ?>
            </div>
            <div class="content">
                <?= $this->layout()->content; ?>
            </div>
        </div>
        <div class="footer">
            <a href="/"><?= $this->shopName ?> - <?= $this->translate('Online store in Mena'); ?></a>
        </div>
    </body>
</html>
